package com.urfresh.sp.flume.receive.stream;

import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.stereotype.Service;

@Service
public class WordCountTrackInfo {
    
    Logger logger = LoggerFactory.getLogger(WordCountTrackInfo.class);
    
    @Autowired
    MongoTemplate mongoTemplate;

    /**
     * 保存android设备的安装列表
     *
     * @param records
     */
    public void saveAppListDataInfo(Iterable<ConsumerRecord<String, String>> records) {
        for (ConsumerRecord<String, String> r : records) {
            logger.info("app event track=" + r);
            //增加保存时间
            System.out.println(r.value());
        }
    }

}
